home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
tpc10.arc
/
TPCMAC.H
< prev
Wrap
Text File
|
1986-12-30
|
1KB
|
58 lines
/*
* TPCMAC.H - Macro Header for use with Turbo Pascal --> C Translator
*
* S.H.Smith, 22-Dec-86
*
*/
#include <stdio.h>
#define keypressed kbhit()
#define upcase(c) toupper(c)
#define length(s) strlen(s)
#define dispose(v) free(v)
#define chr(n) (n)
#define ord(c) (c)
#define false 0
#define true 1
#define THRU -2
#define ENDSET -1
/*
* support library functions:
*
* setof(a,b,...,-1)
* construct and return a set of the specified character values
*
* inset(ex,set)
* predicate returns true if expression ex is a member of
* the set parameter
*
* copy(dstr,from,len)
* copy len bytes from the dynamic string dstr starting at offset from
*/
/*
* concatenate str1 and str2 and return a pointer to the
* static result. note that str1 or str2 may point to the
* concat static buffer.
*/
char *concat(s1,s2)
char *s1;
char *s2;
{
static char buf[255];
char ts2[255];
strcpy(ts2,s2); /* this is needed because either s1 or s2 could
already point to buf! */
strcpy(buf,s1);
strcat(buf,ts2);
return buf;
}